//
//  BDPanOauthManager.h
//  APaaS
//
//  Created by luochao04 on 2022/6/15.
//

#import <Foundation/Foundation.h>
#import "HYRequestBaseHelper.h"
#import "HYBDPanFileModel.h"

NS_ASSUME_NONNULL_BEGIN

typedef void(^BDPanOauthCompletion)(id);
typedef void(^initializeSDKSucceedBlock)(void);
typedef void(^BDFileListBlock)(NSArray*);
typedef void(^LoginOutBDpan)(void);
typedef void(^BDFileInfo)(id);
typedef void(^UserInfoErrorCodeString)(NSString *errorStr);
@interface BDPanOauthManager : NSObject

@property (nonatomic, assign) NSInteger appId;
@property (nonatomic, copy) NSString *accessToken;
@property (nonatomic, copy) NSString *refreshToken;
@property (nonatomic, copy) NSString *userVip;
@property (nonatomic, copy) NSString *BDPanOauthAppID;
@property (nonatomic, copy) NSString *BDPanOauthAppkey;
@property (nonatomic, copy) NSString *BDPanOauthrSecretKey;
@property (nonatomic, copy) NSString *BDPanOauthrRedirectURI;
@property (nonatomic, copy) NSString *BDPanOauthScope;

+ (instancetype)manager;
//退出当前账号
- (void)quitBDpan:(LoginOutBDpan)quit;
//清除当前账号的信息
- (void)disableOauthInfo;
//获取路径上的数据
- (void)subList:(NSString *)path bDFileInfo:(BDFileInfo)bDFileInfo;
//获取视频流
- (void)fetchVideoInfoWithModel:(HYBDPanFileModelList *)model completion:(BDFileInfo)completion;
//查询fid 单个fid或者数组都行
- (void)searchFids:(id )fid bDFileInfo:(BDFileInfo)bDFileInfo;
//获取用户信息
- (void)getUserInfo:(UserInfoErrorCodeString)errorCodeStr;
@end

NS_ASSUME_NONNULL_END
